package org.xg.study.pd.model.aggregates;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.xg.study.pd.model.vo.TreeNode;
import org.xg.study.pd.model.vo.TreeRoot;

import java.util.Map;

/**
 * @author CMG
 * @version 1.0
 * @className TreeRich
 * @description 规则树聚合
 * @date 2021/9/14 21:25
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeRich {
    /**
     * 树根信息
     */
    private TreeRoot treeRoot;
    /**
     * 树节点ID->子节点
     */
    private Map<Long, TreeNode> treeNodeMap;

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
